In a scanning electron microscope or the like, the working distance of the objective lens is generally adjustable. When the working distance is varied, it is necessary to modify the objective lens current. This technique is disclosed in U.S. Pat. No. 4,393,309. In addition, it is customary that the accelerating voltage for the electron beam is variable. Where the accelerating voltage is varied while maintaining the working distance constant, the objective lens current is changed according to the varying accelerating voltage to prevent defocus. A configuration for this scheme is schematically shown in FIG. 7.
In FIG. 7, an accelerating voltage-setting portion 2 consists of a ten-key pad, knob or the like. If a control unit 1 as consisting of a microprocessor senses that the accelerating voltage-setting portion 2 is operated to indicate a new accelerating voltage V.sub.H under predetermined conditions, then the control unit 1 produces a digital value V.sub.H.sup.*1/2 that is the square root of the accelerating voltage V.sub.H to which a relativistic correction is made. The digital value produced from the control unit 1 is converted into analog form by a D/A converter 3. A desired fraction of the analog voltage from the converter 3 is obtained from a variable resistor 4 acting as a focus-adjusting means and supplied to an objective lens current source 5. This current source 5 produces an exciting current proportional to the above-described value V.sub.H.sup.*1/2 0 to an objective lens coil 6. A focus-adjusting mechanism 7 consists of a knob. The resistance value of the variable resistor 4 can be controlled by rotating this knob.
The conventional structure shown in FIG. 7 can cope with none of the case (1) in which the magnetic poles forming the objective lens saturate, the case (2) in which the magnetic poles do not fully saturate but the nonlinearity of the B-H characteristic curve of the magnetic pole pieces affects the focusing, and the case (3) in which the residual magnetization due to the hysteresis affects the focusing. In these cases, if the accelerating voltage is varied, defocus occurs.
More specifically, in the structure shown in FIG. 7, when no potential gradient exists, the paraxial orbital equation is given by EQU X"+(eB.sup.2/ 8mV.sub.H.sup.*)X=0
where X is the orbit of electrons expressed in terms of a system of rotational coordinates, e/m is the specific charge to mass ratio of an electron, V.sub.H.sup.* is the accelerating voltage to which a relativistic correction is made, and B is the axial magnetic field. This structure is built on the principle that the axial magnetic field is in proportion to the exciting current fed to the objective lens provided that (1) B.sup.2 /V.sub.H.sup.* is a parameter, and (2) the magnetic poles do not saturate and no permanent magnet is used in the objective lens. Therefore, this structure is quite advantageous where these two requirements are satisfied. However, these conditions are not met in the case in which the magnetic poles saturate, in the case in which the magnetic poles do not fully saturate but the nonlinearity of the B-H characteristic curve of the magnetic poles affects the focusing, or in the case in which the residual magnetization attributable to the hysteresis or other phenomenon affects the focusing. In any of these cases, defocus takes place. When the lens having the magnetic pole pieces saturates, the peak magnetic field generally weakens. Accordingly, in order to maintain the focal point fixed, an objective lens current is needed which is larger than the current proportional to the square root V.sub.H.sup.*1/2 of the accelerating voltage V.sub. to which a relativistic correction is made. Since the magnetic field strength of the objective lens increases with increasing the objective lens current, where the working distance WD is varied while maintaining the accelerating voltage constant, if the working distance is shortened, the effect of the saturation of the magnetic pole pieces becomes more conspicuous than in the case in which the working distance is increased. Where the accelerating voltage is varied while maintaining the working distance constant, the effect is greater when the accelerating voltage is increased than when it is reduced. The objective lens current which is needed to maintain the focal point fixed is indicated by curves 30, 31, 33 in FIG. 2.
On the other hand, where the accelerating voltage is changed while the working distance WD is kept constant, V.sub.H.sup.*1/2 is not input to the D/A converter 3 but the working distance WD is read from the focus-adjusting mechanism 7 as shown in FIG. 8. Then, V.sub.H.sup.*1/2 is modified, taking account of the saturation of the magnetic pole pieces at this working distance WD read out in this way and applied to the D/A converter 3. In FIG. 8, this modified value is denoted by ##EQU1## In this way, defocus can be prevented when the accelerating voltage is varied. In this case, however, the control unit 1 must be loaded with a table of every value of the working distance WD corresponding to every value of the accelerating voltage. In consequence, the capacity of the memory is exorbitant.